global
  log 127.0.0.1 local0
  log 127.0.0.1 local1 notice
  tune.ssl.default-dh-param 2048

defaults
  log global
  mode http
  #option httplog
  option dontlognull
  timeout connect 5000ms
  timeout client 50000ms
  timeout server 50000ms

listen stats
    bind :9090
    mode http
    balance
    stats uri /haproxy_stats
    stats auth admin:admin123
    stats admin if TRUE

frontend api-https
   mode tcp
   bind :6443
   default_backend api-backend

backend api-backend
    mode tcp
{% for host in groups['Master'] %}    server  api{{ loop.index }}  {{ hostvars[host].ansible_default_ipv4.address }}:5443  check
{% endfor %}